obj-$(CONFIG_RK_WIFI_DEVICE_UWE5622) += unisocwcn/
obj-$(CONFIG_WLAN_UWE5622)    += unisocwifi/
obj-$(CONFIG_TTY_OVERY_SDIO)  += tty-sdio/

src = $(PWD)/drivers/uwe5622

UNISOCWCN_DIR := $(shell cd $(src)/unisocwcn/ && /bin/pwd)
UNISOC_BSP_INCLUDE := $(UNISOCWCN_DIR)/include
export UNISOC_BSP_INCLUDE

UNISOC_FW_PATH_CONFIG := "/lib/firmware/"
export UNISOC_FW_PATH_CONFIG

modules:
	$(Q)$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) KDIR=$(KERNEL_SRC) CONFIG_AW_WIFI_DEVICE_UWE5622=y -C ./unisocwcn modules
	$(CROSS_COMPILE)strip --strip-unneeded ./unisocwcn/uwe5622_bsp_sdio.ko
	$(Q)$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) KDIR=$(KERNEL_SRC) CONFIG_AW_WIFI_DEVICE_UWE5622=y KBUILD_EXTRA_SYMBOLS=$(src)/unisocwcn/Module.symvers -C ./unisocwifi modules
	$(CROSS_COMPILE)strip --strip-unneeded ./unisocwifi/sprdwl_ng.ko
	$(Q)$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) KDIR=$(KERNEL_SRC) CONFIG_AW_WIFI_DEVICE_UWE5622=y KBUILD_EXTRA_SYMBOLS=$(src)/unisocwcn/Module.symvers -C ./tty-sdio modules
	$(CROSS_COMPILE)strip --strip-unneeded ./tty-sdio/sprdbt_tty.ko

clean:
	$(Q)$(MAKE) KDIR=$(KERNEL_SRC) -C ./unisocwcn clean
	$(Q)$(MAKE) KDIR=$(KERNEL_SRC) -C ./unisocwifi clean
	$(Q)$(MAKE) KDIR=$(KERNEL_SRC) -C ./tty-sdio clean
